Barcodes and other machine-readable codes are used extensively in industrial applications for shipment tracking, document workflow, medical applications, surveys, tracking documents, and associating paper with electronic media. In many such applications, linear and/or two-dimensional barcodes are read and decoded from electronic images that are obtained by scanning hard-copy documents. Thus, reading and decoding a barcode entails locating the barcode within an image. Such a task can often require a large amount of memory and can take a significant amount of processing time. Some devices, such as portable or handheld computers, do not have the processing power or available memory to perform such operations, and are therefore unable to decode and read barcodes from images. Other devices have the capability to perform such operations, but may do so more slowly than is desired, or may unduly task their resources in doing so.
In general, in order to read a barcode, a computer system must have enough random access memory (RAM) to load a scanned image containing the barcode, and must further have special software for locating and decoding the barcode within the scanned image. Letter-sized pages scanned at a typical resolution of 600 dpi have 5100×6600 pixels (over 33 million pixels). An image of this size can consume up to 4 megabytes of memory, or more. Finding barcodes in such a large image can take a significant amount of time and processing power.
What is needed, therefore, is a method, system, and computer program product for reading barcode data and other machine-readable data from an image file without requiring large amounts of memory and processing power. What is further needed is a method, system, and computer program product that avoids the need to read such data from a raw image file, and that takes advantage of auxiliary fields available in many image file formats. What is further needed is a method, system, and computer program-product that avoids the need to read barcode data more than once.